package org.unei.common.monitor;

public class PerformanceMonitor {
	private static ThreadLocal<MethodPerformance> perfRecord=new ThreadLocal<MethodPerformance>();
	
	public static void begin(String method){
		System.out.println("begin monitor...");
		MethodPerformance mp=new MethodPerformance(method);
		perfRecord.set(mp);
	}
	
	public static void end(){
		System.out.println("end monitor...");
		MethodPerformance mp=perfRecord.get();
		mp.printPerformace();
	}
}
